All files / src/app/recipes/[id]/components RecipeVideo.tsx

0% Statements 0/3
100% Branches 0/0
0% Functions 0/1
0% Lines 0/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28                                                       
import { Box, Title } from '@mantine/core';
import { useTranslations } from 'next-intl';
import classes from '../RecipeDetail.module.css';
import type { RecipeVideoProps } from '../types';
 
export const RecipeVideo = ({
  youtubeId,
  title,
}: Readonly<RecipeVideoProps>) => {
  const translate = useTranslations('recipeDetail');
 
  return (
    <Box>
      <Title order={2} size="h3" mb="md">
        {translate('videoTitle')}
      </Title>
      <Box className={classes.videoWrapper}>
        <iframe
          src={`https://www.youtube-nocookie.com/embed/${youtubeId}`}
          title={title}
          allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
          allowFullScreen
        />
      </Box>
    </Box>
  );
};